Add WASI versioning infrastructure and convert wasmtime page#340
Open
ericgregory wants to merge 3 commits intobytecodealliance:mainfrom
Open
Add WASI versioning infrastructure and convert wasmtime page#340ericgregory wants to merge 3 commits intobytecodealliance:mainfrom
ericgregory wants to merge 3 commits intobytecodealliance:mainfrom
Conversation
Introduces tabbed content support for WASI P2/P3 via the mdbook-tabs preprocessor, a version-notice component, and demonstrates the pattern on the Wasmtime running-components page. - Add mdbook-tabs preprocessor and installed tabs.css/tabs.js assets - Customize tab label colors to use --sidebar-active per theme, with a Rust-theme override where the orange accent loses contrast on tan - Add theme/version-notice.css for a branded, theme-aware notice bar - Register the new CSS/JS in book.toml - Convert running-components/wasmtime.md to tabbed P2/P3 content, hedging wasmtime serve claims against current release notes - Update links to the WebAssembly/WASI monorepo (wasi-cli and wasi-http were archived 2025-11-25) - Correct the wasmtime serve availability claim from v14.0.3 to v18.0.0 to match the Wasmtime CLI documentation
9 tasks
Supports shareable deep links with a ?wasi=p2 or ?wasi=p3 query parameter. On page load, the parameter selects the matching tab (and persists via the existing localStorage mechanism). Clicking a tab updates the URL via history.replaceState. - Add theme/tabs-url-sync.js alongside the mdbook-tabs plugin's tabs.js. The companion script runs after the plugin's handler, reads the URL on load, and listens for tab clicks via delegation. - Register the new file in book.toml under additional-js - Backward compatible: pages without the parameter retain the existing localStorage-based behavior
Four enhancements to the tabs infrastructure: - A new theme/tabs-a11y.js layers ARIA roles and keyboard navigation onto the plugin's markup: role=tablist, role=tab, role=tabpanel, aria-selected, aria-controls, aria-labelledby, aria-hidden, and roving-tabindex arrow-key navigation with Home/End support - Extend theme/tabs-url-sync.js so a URL hash targeting an element inside a hidden tab pane activates the enclosing tab and scrolls the target into view - Print stylesheet: reveal all tab panes with a heading-style label and hide the interactive nav under @media print - Relocate tab style overrides from theme/tabs.css into a new theme/tabs-overrides.css so future `mdbook-tabs install` runs cannot overwrite them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The WASI P3 release is approaching, and the Component Model Book needs a way to present content that differs
between P2 and P3 without forking pages or duplicating sections. This PR introduces the infrastructure for that (tabbed content blocks and a version notice admonition) and demonstrates the pattern on one real content page (
/running-components/wasmtime.html).Major changes:
mdbook-tabspreprocessor (v0.2.3 for wire-protocol compatibility with the pinned mdbook 0.4.21) and registertheme/tabs.css+theme/tabs.jsinbook.tomlrunning-components/wasmtime.mdto use tabs for the two version-sensitive sections (intro and HTTPserving), leaving the
wasmtime runand custom-exports sections untabbed since they behave identically across versions